﻿	
	
create proc sp_suagiatp
@MaTP int,
@dongia int,
@giabanle int,
@NgayLap date,
@barcode char
as
declare @dem as int
select @dem=count(*) from DanhMucGiaTP where MaTP=@MaTP
if(@dem>0)
	begin
	update DanhMucGiaTp
	set DonGia=@dongia,GiaBanLe=@giabanle,NgayLap=@ngaylap,barcode=@barcode
	where matp=@MaTP
	select ErrCode=1
	end
else
	begin
	select ErrCode=0
	end